import Router from 'koa-router';
import proxyService from '../../common/proxyService';
import {
  getFissionListCHAT, // h5裂变列表
  getHFissionInfoShareCHAT, // h5裂变分享信息
  getFormInfoByPageCHAT, // 智能表单列表
  getFrFormInfoShareCHAT, // 智能表单分享信息
  getPosterTemplateByPageCHAT, // 裂变宝列表
  getPosterTemplateCHAT, // 裂变宝详情
  queryCssGroupCHAT,
} from '../../api';

const router = new Router();

// h5裂变列表
router.post('/getFissionListChat', async ctx => {
  const response = await proxyService.postProxy(ctx, getFissionListCHAT);
  return (ctx.body = response);
});

// h5裂变分享信息
router.post('/getHFissionInfoShareChat', async ctx => {
  const response = await proxyService.postProxy(ctx, getHFissionInfoShareCHAT);
  return (ctx.body = response);
});

// 智能表单列表
router.post('/getFormInfoByPageChat', async ctx => {
  const response = await proxyService.postProxy(ctx, getFormInfoByPageCHAT);
  return (ctx.body = response);
});

// 智能表单分享信息
router.post('/getFrFormInfoShareChat', async ctx => {
  const response = await proxyService.postProxy(ctx, getFrFormInfoShareCHAT);
  return (ctx.body = response);
});

// 裂变宝列表
router.post('/getPosterTemplateByPageChat', async ctx => {
  const response = await proxyService.postProxy(ctx, getPosterTemplateByPageCHAT);
  return (ctx.body = response);
});

// 裂变宝详情
router.post('/getPosterTemplateChat', async ctx => {
  const response = await proxyService.postProxy(ctx, getPosterTemplateCHAT);
  return (ctx.body = response);
});

// 裂变宝列表
router.post('/queryCssGroupChat', async ctx => {
  const response = await proxyService.postProxy(ctx, queryCssGroupCHAT);
  return (ctx.body = response);
});

export default router;
